﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPointer>
#include <QProcess>
#include <QTextEdit>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget* parent = nullptr);
    ~MainWindow();

public slots:
    void slot_openPostProcessingModel();
    void slot_openReportModel();
    void slot_screenshoot();
    void slot_screenshootToReport();


private:
    void hideAllSubWindow();
    void handleChildProcessMsg();
    void handleChildReportProcessMsg();
    void runExternalProcess();
    void InitChildProcess();
    void InitChildReportProcess();
    void readOutput();
    void readError();
private:
    Ui::MainWindow* ui;
    QProcess* process;
    QTextEdit* outputDisplay;
    QProcess* m_process = Q_NULLPTR;
    QProcess* m_report = Q_NULLPTR;
    QWidget* m_widget = Q_NULLPTR;
};
#endif // MAINWINDOW_H
